package sample;


import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;

import java.net.URL;
import java.util.ResourceBundle;

public class Controller implements Initializable {
    @FXML
    private Button id_1;
    @FXML
    private TextField text_1;
    @FXML
    private TextField text_2;
    @FXML
    private TextArea text_3;
    @Override
    public void initialize(URL location, ResourceBundle resources)
    {}


    public void buttonAction1(ActionEvent actionEvent)
    {
        String year = text_1.getText();
        String month = text_2.getText();
        String result= Service.calculationDate(year,month);
        text_3.setText(result);
    }
}
